package hc.j2me.item;

import hc.core.ContextManager;
import hc.j2me.util.Jcip;
import hc.j2me.util.OutPortTranser;
import hc.j2me.util.SoundUtil;

public class MIDTone extends javax.microedition.lcdui.Spacer implements IPort{

	public MIDTone() {
		super(0, 0);
		Jcip.getInstance().init(this);
	}

	public void appendOutPort(OutPortTranser out) {
	}

	public void appendInPort(Jcip jcip) {
		if(ContextManager.getContextInstance().isSoundOnMode()){
		  SoundUtil.playTone(jcip.getInt(), jcip.getInt(), jcip.getInt());
		}
	}

	String id = null;
	public String getID() {
		return id;
	}

	public void setID(String id) {
		this.id = id;
	}
	
	short ioMode = 0;

	public void setIOMode(short mode) {
		this.ioMode = mode;
	}
	
	public short getIOMode(){
		return ioMode;
	}
}
